#ifndef SKYID_TEXTURE_H 
#define SKYID_TEXTURE_H

#include <GL/gl.h>
#include <GL/glext.h>

#include "common.h"
#include "object.h"
#include "image.h"

namespace SkyID 
{

//- Texture -------------------------------------------------------------------

class Texture : public Object
{
public:
	Texture();
	Texture(const Image *image, GLint clampMode = GL_CLAMP);
	virtual ~Texture();

	bool create(const Image *image, GLint clampMode = GL_CLAMP);

	GLuint getID() const { return mID; }
	GLsizei getWidth() const { return mWidth; }
	GLsizei getHeight() const { return mHeight; }
	GLenum getFormat() const { return mFormat; }
	GLenum getTarget() const { return mTarget; }

protected:
	GLuint mID;
	GLsizei mWidth, mHeight;
	GLenum mFormat, mTarget;
};

} // namespace SkyID

#endif // SKYID_TEXTURE_H
